<!--
 * createor: zc
 * email: zc8023zs@163.com
 * create_time: 2020/3/14 13:46:24
 *-->
<template>
  <el-container>
    <el-header>
      门店消息详情
    </el-header>
    <el-main>
      <el-form label-width="200px" :inline="true" style="padding:5% 5% 0 5%">
        <el-form-item label="标识id：">
          <span>{{formData.message_shop_id}}</span>
        </el-form-item>
        <el-form-item label="标识id：">
          <span>{{formData.shop_id}}</span>
        </el-form-item>
        <el-form-item label="运营中心id：">
          <span>{{formData.oc_id}}</span>
        </el-form-item>
        <el-form-item label="标题：">
          <span>{{formData.title}}</span>
        </el-form-item>
        <el-form-item label="内容：">
          <span>{{formData.content}}</span>
        </el-form-item>
        <el-form-item label="创建时间：">
          <span>{{formData.create_time}}</span>
        </el-form-item>
        <el-form-item label="关联订单id：">
          <span>{{formData.order_id}}</span>
        </el-form-item>
        <el-form-item label="状态：">
          <span>{{formData.status}}</span>
        </el-form-item>
      </el-form>
    </el-main>
  </el-container>
</template>
<style scoped>
body .app-container .el-container,
body .app-container .el-header,
body .app-container .el-main,
body .el-container,
body .el-header,
body .el-main {
  padding: 0;
  -webkit-box-sizing: border-box;
  box-sizing: border-box;
}
</style>
<script>
import { Loading } from "element-ui";
import {
  qr_message_shopInfo
} from '@/api/project/wmyw/project_wmyw_qr_message_shop'
export default {
  name: "a_wmywa_qr_message_shop_info",
  data() {
    return {
      infoLoading: false,
      formData:{
        message_shop_id: 0, 
        shop_id: 0, 
        oc_id: 0, 
        title: '', 
        content: '', 
        create_time: '2020/8/11 15:00:32', 
        order_id: 0, 
        status: 0, 
      }
    };
  },
  activated() {
    var result = location.search.match(new RegExp("[\?\&]id=([^\&]+)", "i"));
    if(result != null || result.length > 0){
      this.onInfo(result[1]);
    }
  },
  methods: {
    onInfo(id){
      this.infoLoading=true;
      qr_message_shopInfo({id:id}).then(r=>{
        this.formData.message_shop_id = r.dataSingle.message_shop_id, 
        this.formData.shop_id = r.dataSingle.shop_id, 
        this.formData.oc_id = r.dataSingle.oc_id, 
        this.formData.title = r.dataSingle.title, 
        this.formData.content = r.dataSingle.content, 
        this.formData.create_time = r.dataSingle.create_time, 
        this.formData.order_id = r.dataSingle.order_id, 
        this.formData.status = r.dataSingle.status, 
        this.infoLoading=false;
      }).catch(()=>{
        this.infoLoading=false;
      });
    }
  }
}
</script>
